package STUDENT.TRINHQUANGXUANDUC.OPPS.HINHCHUNHAT;

import java.util.Scanner;

public class Views {
	public static void main(String[] args) {
		Controllers cnControllers = new Controllers();
		Scanner sc = new Scanner(System.in);
		ChuNhatObject object = new ChuNhatObject();
		ChuNhatObject rectangleObject = new ChuNhatObject();
		System.out.println("Hinh chu nhat thu nhat");
		System.out.println("Nhap chieu dai: ");
		object.setChieudai(sc.nextDouble());
		System.out.println("Nhap chieu rong:");
		object.setChieurong(sc.nextDouble());
		System.out.println("Mau cua hinh chu nhat la:");
		sc = new Scanner(System.in);
		object.setColor(sc.nextLine());
		System.out.println("Hinh chu nhat thu hai");
		sc = new Scanner(System.in);
		System.out.println("Nhap chieu dai: ");
		rectangleObject.setChieudai(sc.nextDouble());
		System.out.println("Nhap chieu rong:");
		sc = new Scanner(System.in);
		rectangleObject.setChieurong(sc.nextDouble());
		System.out.println("Mau cua hinh chu nhat:");
		sc = new Scanner(System.in);
		rectangleObject.setColor(sc.nextLine());
		System.out.println("Hinh thu nhat" + cnControllers.Tinhtoan(object));
		System.err.println("Hinh thu hai" + cnControllers.Tinhtoan(rectangleObject));
	}
}
